import 'dart:async';
import '../common.dart';

import 'package:carousel_slider/carousel_slider.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:url_launcher/url_launcher.dart';

class Pindex extends StatefulWidget {
  // const Pindex({super.key});

  @override
  State<Pindex> createState() => _QGBannerWidgetState();
}

List<Map<String, String>> tabItems = [
  {"text": "涨幅最大", "img": "zhanghu", "imgs": "zhanghus"},
  {"text": "热门藏品", "img": "remen", "imgs": "remens"},
  {"text": "本周上新", "img": "benzhou", "imgs": "benzhous"},
];
int tabIndex = 0;

int tindex = 0;

int carouseIndex = 0;

List announcementList = [];

List imgList = [];
List items = [];
var goodList = [];
List hotList = [];
List allList = [];

class _QGBannerWidgetState extends State<Pindex> {
  var user = {};
  String token = '';
  var phone = '';
  // ignore: prefer_typing_uninitialized_variables
  late final subscription;

  @override
  void dispose() {
    // TODO: implement dispose
    subscription.cancel();
    super.dispose();
  }

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    subscription = eventBus.on<UserLoginEvent>().listen((event) {
      getallgoods();
      gethotgoods();
    });

    token = myget('token') ?? '';
    if (token.isNotEmpty) {
      user = myget('user');
      phone = myget('phone');
      getcategories();
      getbanner();
      getCategory();
      gethotgoods();
      getallgoods();
    } else {
      Timer(Duration(seconds: 1), () {
        Get.offAllNamed('/login/login_type');
      });
    }

    if (!kIsWeb) {
      infoversions();
    }
  }

  getallgoods() {
    getData(
      url: '/index/all_goods',
      load: false,
      data: {"limit": '100', 'per_page': '100'},
    ).then((res) {
      allList = res;
    });
  }

  gethotgoods() {
    getData(url: '/index/hot_goods', load: false, data: {"limit": '100'}).then((
      res,
    ) {
      hotList = res;
    });
  }

  getgoods(type, id) {
    getData(
      url: '/index/goods',
      load: false,
      data: {"type": type, "category_id": id.toString()},
    ).then((resw) {
      goodList = resw;
      setState(() {});
    });
  }

  getcategories() {
    getData(url: '/index/categories', load: false).then((res) {
      items = res;
      getgoods('increase', res[0]['id']);
    });
  }

  getbanner() {
    getData(url: '/banner', load: false).then((res) {
      imgList = res;
    });
  }

  getCategory() {
    getData(url: '/announcement/category', load: false).then((res) {
      getAnnouncement(0);
    });
  }

  getAnnouncement(id) {
    getData(
      url: '/announcement',
      data: {'category_id': '$id'},
      load: false,
    ).then((res) {
      announcementList = res;
    });
  }

  infoversions() async {
    final info = await PackageInfo.fromPlatform();
    final versions = info.version;
    postData(
      url: '/version/app/check-update',
      data: {'version': versions, 'type': 'android'},
      load: false,
    ).then((res) {
      if (res['is_has_update'] == 1) {
        upversion();
      }
    });
  }

  upversion() {
    Get.dialog(
      barrierDismissible: false,
      PopScope(
        canPop: false,
        child: AlertDialog(
          backgroundColor: Colors.transparent,
          shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(5)),
          content: Stack(
            children: [
              Image.asset('static/tan.png', width: 255, fit: BoxFit.fitWidth),
              Positioned(
                top: 30,
                right: 0,
                left: 0,
                child: Column(
                  children: [
                    SizedBox(height: 15),
                    Image.asset(
                      'static/loggin.png',
                      width: 100,
                      fit: BoxFit.fitWidth,
                    ),
                    SizedBox(height: 10),
                    Text(
                      '发现新版本',
                      style: TextStyle(fontSize: 24, color: Color(0XFF0F172B)),
                    ),
                    SizedBox(height: 20),
                    Text(
                      '旧版本已停用，请及时下载新版本',
                      style: TextStyle(fontSize: 12, color: Color(0XFF999999)),
                    ),
                    SizedBox(height: 10),
                    Container(
                      margin: EdgeInsets.symmetric(horizontal: 30),
                      decoration: BoxDecoration(
                        color: Color(0XFFF8F9FD),
                        borderRadius: BorderRadius.circular(10),
                      ),
                    ),
                    SizedBox(height: 30),
                    GestureDetector(
                      onTap: () {
                        final uur = Uri.parse(downurl);
                        launchUrl(uur, webOnlyWindowName: '_self');
                      },
                      child: Container(
                        width: 210,
                        height: 45,
                        decoration: BoxDecoration(
                          color: Color(0XFF0F172B),
                          borderRadius: BorderRadius.circular(45),
                        ),
                        alignment: Alignment.center,
                        child: Text(
                          '确认',
                          style: TextStyle(
                            fontSize: 18,
                            color: Color(0XFFFFFFFF),
                          ),
                        ),
                      ),
                    ),
                    SizedBox(height: 10),
                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }

  @override
  Widget build(BuildContext context) {
    con(context);
    final totalW = MediaQuery.of(context).size.width - 30;
    final totalH = MediaQuery.of(context).size.width + 30;

    return Column(
      children: [
        SizedBox(height: 30),
        Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Container(
              child: GestureDetector(
                behavior: HitTestBehavior.opaque,
                onTap: () {
                  if (token.isEmpty) {
                    Get.offAllNamed('/login/login_type');
                  } else {
                    toNamed('/user/index').then((res) {
                      user = myget('user');
                      setState(() {});
                    });
                  }
                },
                child: Row(
                  children: [
                    wImage(
                      url: '${user['headimg']}',
                      width: 55,
                      height: 55,
                      borderRadius: 15,
                    ),
                    SizedBox(width: 10),
                    if (token.isEmpty)
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          wText(text: 'Hi，请点击登录', size: 14, bold: true),
                        ],
                      ),

                    if (token.isNotEmpty)
                      Column(
                        crossAxisAlignment: CrossAxisAlignment.start,
                        children: [
                          wText(text: user['name'], size: 14, bold: true),
                          SizedBox(height: 10),

                          if (user['metaAddress'].isNotEmpty)
                            GestureDetector(
                              onTap: () {
                                copy(context, '${user['metaAddress']}');
                              },
                              child: Row(
                                children: [
                                  wText(
                                    text:
                                        '区块链地址:${user['metaAddress'].substring(0, 5)}....${user['metaAddress'].substring(user['metaAddress'].length - 4)}',
                                    color: '0F172B',
                                  ),
                                  SizedBox(width: 2),
                                  wImage(url: 'copy', width: 11),
                                ],
                              ),
                            ),
                          if (user['metaAddress'].isEmpty)
                            wText(text: '区块链地址:请先实名', color: '0F172B'),
                        ],
                      ),
                  ],
                ),
              ),
            ),
            GestureDetector(
              behavior: HitTestBehavior.opaque,
              onTap: () {
                toNamed('/user/assets');
              },
              child: wImage(url: 'kabao', width: 30),
            ),
          ],
        ),
        SizedBox(height: 0),
        Divider(color: Color(0XFFE7E7E9)),
        Expanded(
          child: ListView(
            padding: EdgeInsets.only(top: 7),
            children: [
              Container(
                height: 30,
                child: ListView.builder(
                  scrollDirection: Axis.horizontal,
                  itemCount: items.length, // 子项的总数
                  itemBuilder: (context, index) {
                    // 根据索引返回相应的Widget
                    return GestureDetector(
                      onTap: () {
                        tindex = index;
                        tabIndex = 0;
                        getgoods('increase', items[index]['id']);
                      },
                      child: Container(
                        margin: EdgeInsets.only(right: 10),
                        alignment: Alignment.center,
                        padding: EdgeInsets.symmetric(horizontal: 10),
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(5),
                          border: Border.all(
                            color: Color(
                              tindex == index ? 0XFF0F172B : 0XFF878B95,
                            ),
                          ),
                        ),
                        child: Row(
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            if (items[index]['thumb'].isNotEmpty)
                              wImage(
                                url: "${items[index]['thumb']}",
                                width: 13,
                              ),

                            if (items[index]['thumb'].isNotEmpty)
                              SizedBox(width: 2),

                            wText(
                              text: '${items[index]['title']}',
                              size: 12,
                              bold: true,
                              color: tindex == index ? '0F172B' : '878b95',
                            ),
                          ],
                        ),
                      ),
                    );
                  },
                ),
              ),
              SizedBox(height: 15),
              Center(
                child: CarouselSlider.builder(
                  itemCount: imgList.length,
                  itemBuilder: (
                    BuildContext context,
                    int index,
                    int realIndex,
                  ) {
                    return Stack(
                      children: [
                        GestureDetector(
                          onTap: () {
                            if (imgList[index]['link']['type'] == 'type') {
                              toNamed(
                                '/home/detail?uuid=${imgList[index]['link']['product']}',
                              );
                            } else {
                              if (imgList[index]['link']['url'].startsWith(
                                "http",
                              )) {
                                toNamed(
                                  '/web_webview?url=${imgList[index]['link']['url']}',
                                );
                              }
                            }
                          },
                          child: wImage(
                            url: '${imgList[index]['image']}',
                            width: totalW,
                            height: totalH,
                            fit: BoxFit.cover,
                            borderRadius: 15,
                          ),
                        ),
                        Positioned(
                          bottom: 10,
                          right: 10,
                          left: 10,
                          child: Container(
                            padding: EdgeInsets.only(left: 10),
                            height: 50,
                            decoration: BoxDecoration(
                              borderRadius: BorderRadius.circular(10),

                              color: Color.fromRGBO(255, 255, 255, 0.2),
                            ),
                            child: Column(
                              mainAxisAlignment: MainAxisAlignment.center,
                              children: [
                                Row(
                                  children: [
                                    wText(
                                      text: imgList[index]['link']['title'],
                                      color: 'FFFFFF',
                                      size: 15,
                                    ),
                                    setInteger(
                                      imgList[index]['link']['vlv'],
                                      w: 18,
                                    ),
                                  ],
                                ),
                                Row(
                                  children: [
                                    wText(
                                      text:
                                          '来自 ${imgList[index]['link']['copyright']}',
                                      color: '959B98',
                                      size: 11,
                                    ),
                                    wImage(url: 'baiv', width: 12),
                                  ],
                                ),
                              ],
                            ),
                          ),
                        ),
                      ],
                    );
                  },
                  options: CarouselOptions(
                    onPageChanged: (indexa, reason) {
                      carouseIndex = indexa;
                      setState(() {});
                    },
                    height: totalH,
                    enlargeCenterPage: true,
                    aspectRatio: 1 / 1,
                    autoPlay: false,
                    viewportFraction: 1,
                    // autoPlayInterval: Duration(seconds: 3),
                    autoPlayAnimationDuration: Duration(milliseconds: 800),
                    // autoPlayCurve: Curves.fastOutSlowIn,
                    pauseAutoPlayOnTouch: true,
                    //enlargeCenterPageScale: 1.2,
                  ),
                ),
              ),
              SizedBox(height: 10),
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: List.generate(imgList.length, (indexf) {
                  return Container(
                    height: 5,
                    width: (totalW - 10) / imgList.length,
                    decoration: BoxDecoration(
                      borderRadius: BorderRadius.circular(5),
                      color: Color(
                        carouseIndex == indexf ? 0xff0F172B : 0XFFe7e7e9,
                      ),
                    ),
                  );
                }),
              ),
              SizedBox(height: 20),

              Row(
                children: [
                  wImage(url: 'gonggao', width: 30),
                  SizedBox(width: 5),

                  Container(width: 1, height: 20, color: Color(0XFFe7e7e9)),
                  SizedBox(width: 5),
                  Expanded(
                    child: CarouselSlider.builder(
                      itemCount: announcementList.length,
                      itemBuilder: (
                        BuildContext context,
                        int index,
                        int realIndex,
                      ) {
                        return Row(
                          crossAxisAlignment: CrossAxisAlignment.start,
                          children: [
                            GestureDetector(
                              onTap: () {
                                toNamed(
                                  '/web_tabs/announcement/detail?uuid=${announcementList[index]['uuid']}',
                                );
                              },
                              child: Container(
                                width: 250,
                                child: Text(
                                  '${announcementList[index]['title']}',
                                  style: TextStyle(
                                    fontSize: 16,
                                    fontWeight: FontWeight.bold,
                                  ),
                                  maxLines: 1,
                                  overflow: TextOverflow.ellipsis,
                                ),
                              ),
                            ),
                          ],
                        );
                      },
                      options: CarouselOptions(
                        onPageChanged: (indexa, reason) {},
                        scrollDirection: Axis.vertical,
                        height: 25,
                        enlargeCenterPage: true,
                        aspectRatio: 1 / 1,
                        autoPlay: false,
                        viewportFraction: 1,
                        // autoPlayInterval: Duration(seconds: 3),
                        autoPlayAnimationDuration: Duration(milliseconds: 800),
                        // autoPlayCurve: Curves.fastOutSlowIn,
                        pauseAutoPlayOnTouch: true,
                        //enlargeCenterPageScale: 1.2,
                      ),
                    ),
                  ),
                  SizedBox(width: 10),
                  GestureDetector(
                    onTap: () {
                      toNamed('/web_tabs/announcement/index');
                    },
                    child: wImage(url: 'sangang', width: 20),
                  ),
                ],
              ),

              Container(
                margin: EdgeInsets.only(top: 20),
                height: 35,
                child: ListView.builder(
                  scrollDirection: Axis.horizontal,
                  itemCount: tabItems.length, // 子项的总数
                  itemBuilder: (context, index) {
                    // 根据索引返回相应的Widget
                    return GestureDetector(
                      onTap: () {
                        tabIndex = index;
                        if (index == 0) {
                          getgoods('increase', items[tindex]['id']);
                        } else if (index == 1) {
                          getgoods('hot', items[tindex]['id']);
                        } else if (index == 2) {
                          getgoods('new', items[tindex]['id']);
                        }

                        setState(() {});
                      },
                      child: Container(
                        margin: EdgeInsets.only(right: 10),
                        alignment: Alignment.center,
                        padding: EdgeInsets.symmetric(horizontal: 10),
                        decoration: BoxDecoration(
                          borderRadius: BorderRadius.circular(5),
                          border: Border.all(
                            color: Color(
                              tindex == index ? 0XFF0F172B : 0XFF878B95,
                            ),
                          ),
                        ),
                        child: Row(
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            wImage(
                              url:
                                  tabIndex == index
                                      ? '${tabItems[index]['imgs']}'
                                      : '${tabItems[index]['img']}',
                              width: 13,
                            ),
                            wText(
                              text: '${tabItems[index]['text']}',
                              size: 12,
                              bold: true,
                              color: tabIndex == index ? '0F172B' : '878b95',
                            ),
                          ],
                        ),
                      ),
                    );
                  },
                ),
              ),
              SizedBox(height: 10),
              Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  wText(text: '数字藏品', color: '878b95'),
                  wText(text: '当前市值', color: '878b95'),
                ],
              ),
              SizedBox(height: 10),

              for (var item in goodList.asMap().entries)
                GestureDetector(
                  behavior: HitTestBehavior.opaque,
                  onTap: () {
                    toNamed('/home/detail?uuid=${item.value['uuid']}');
                  },
                  child: Container(
                    margin: EdgeInsets.only(bottom: 20),
                    child: Row(
                      mainAxisAlignment: MainAxisAlignment.spaceBetween,
                      children: [
                        Row(
                          crossAxisAlignment: CrossAxisAlignment.center,
                          children: [
                            Stack(
                              children: [
                                wImage(
                                  url: '${item.value['thumb']}',
                                  width: 45,
                                  height: 45,
                                  borderRadius: 5,
                                ),
                                if (item.value['is_box'] == 1)
                                  Positioned(
                                    bottom: 5,
                                    right: 5,
                                    child: GestureDetector(
                                      onTap: () {
                                        // toNamed('/user/assets?index=1');
                                      },
                                      child: wImage(url: 'box', width: 13),
                                    ),
                                  ),
                              ],
                            ),
                            SizedBox(width: 10),
                            Container(
                              width: 200,
                              child: Row(
                                children: [
                                  Container(
                                    width: 180,
                                    child: Text(
                                      '${item.value['title']}',
                                      maxLines: 1,
                                      overflow: TextOverflow.ellipsis,
                                    ),
                                  ),

                                  // wText(text: '${item.value['title']}'),
                                  setInteger(item.value['vlv'], w: 12, h: 12),
                                ],
                              ),
                            ),
                          ],
                        ),
                        Column(
                          children: [
                            wText(
                              text: '￥${money(item.value['today_price'])}',
                              size: 14,
                              bold: true,
                            ),
                            if (item.value['increase'] > 0)
                              Row(
                                children: [
                                  wImage(url: 'htop', width: 12),
                                  wText(
                                    text: '+${item.value['increase']}%',
                                    size: 11,
                                    bold: true,
                                    color: 'B10000',
                                  ),
                                ],
                              ),
                          ],
                        ),
                      ],
                    ),
                  ),
                ),
              SizedBox(height: 10),

              Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  wImage(url: 'jingxuan', width: 70),
                  SizedBox(height: 5),
                  wText(text: '本周精选系列', color: '878b95'),
                ],
              ),

              Container(
                margin: EdgeInsets.only(top: 20),
                height: 160,
                child: ListView.builder(
                  scrollDirection: Axis.horizontal,
                  itemCount: hotList.length, // 子项的总数
                  itemBuilder: (context, index) {
                    // 根据索引返回相应的Widget
                    return GestureDetector(
                      onTap: () {
                        toNamed('/home/detail?uuid=${hotList[index]['uuid']}');
                      },
                      child: Container(
                        margin: EdgeInsets.only(right: 15),
                        child: Stack(
                          children: [
                            wImage(
                              url: '${hotList[index]['thumb']}',
                              width: 260,
                              borderRadius: 10,
                              height: 160,
                            ),
                            if (hotList[index]['is_box'] == 1)
                              Positioned(
                                bottom: 10,
                                right: 10,
                                child: GestureDetector(
                                  onTap: () {
                                    // toNamed('/user/assets?index=1');
                                  },
                                  child: wImage(url: 'box', width: 20),
                                ),
                              ),
                            Positioned(
                              top: 10,
                              right: 10,
                              child: GestureDetector(
                                onTap: () {
                                  if (hotList[index]['is_like'] == 1) {
                                    postData(
                                      url: '/market/unLikeGoods',
                                      data: {
                                        'product_id': '${hotList[index]['id']}',
                                      },
                                    ).then((res) {
                                      if (res != null) {
                                        hotList[index]['is_like'] = 0;
                                        setState(() {});
                                      }
                                    });
                                  } else {
                                    postData(
                                      url: '/market/likeGoods',
                                      data: {
                                        'product_id': '${hotList[index]['id']}',
                                      },
                                    ).then((res) {
                                      if (res != null) {
                                        showTost('收藏成功');
                                        hotList[index]['is_like'] = 1;
                                        setState(() {});
                                      }
                                    });
                                  }
                                },
                                child:
                                    hotList[index]['is_like'] == 1
                                        ? wImage(url: 'lanxing', width: 25)
                                        : wImage(url: 'xing', width: 25),
                              ),
                            ),
                            Positioned(
                              bottom: 0,
                              right: 0,
                              left: 0,
                              child: Container(
                                padding: EdgeInsets.only(left: 15),
                                alignment: Alignment.centerLeft,
                                height: 35,
                                decoration: BoxDecoration(
                                  borderRadius: BorderRadius.only(
                                    bottomLeft: Radius.circular(10),
                                    bottomRight: Radius.circular(10),
                                  ),
                                  gradient: LinearGradient(
                                    begin: Alignment.topCenter,
                                    end: Alignment.bottomCenter,
                                    colors: [
                                      Colors.black.withValues(alpha: 0),
                                      Colors.black.withValues(alpha: 1),
                                    ],
                                  ),
                                ),
                                child: wText(
                                  text: '${hotList[index]['title']}',
                                  color: 'FFFFFF',
                                  size: 14,
                                ),
                              ),
                            ),
                          ],
                        ),
                      ),
                    );
                  },
                ),
              ),
              SizedBox(height: 30),

              Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                children: [
                  wImage(url: 'quanbu', width: 70),
                  Expanded(child: SizedBox()),
                  wImage(url: 'fashou', width: 15),
                  GestureDetector(
                    onTap: () {
                      toNamed('/home/release_calendar');
                    },
                    child: wText(text: '发售日历', color: '878b95'),
                  ),
                ],
              ),
              SizedBox(height: 10),

              for (var item in allList.asMap().entries)
                GestureDetector(
                  onTap: () {
                    toNamed('/home/detail?uuid=${item.value['uuid']}');
                  },
                  child: Container(
                    margin: EdgeInsets.only(bottom: 30),
                    child: Column(
                      children: [
                        Stack(
                          children: [
                            wImage(
                              width: double.infinity,
                              height: 160,
                              url: '${item.value['thumb']}',
                              borderRadius: 15,
                            ),
                            if (item.value['is_box'] == 1)
                              Positioned(
                                bottom: 10,
                                right: 10,
                                child: GestureDetector(
                                  onTap: () {
                                    // toNamed('/user/assets?index=1');
                                  },
                                  child: wImage(url: 'box', width: 30),
                                ),
                              ),
                            Positioned(
                              right: 10,
                              top: 10,
                              child: GestureDetector(
                                onTap: () {
                                  if (item.value['is_like'] == 1) {
                                    postData(
                                      url: '/market/unLikeGoods',
                                      data: {
                                        'product_id': '${item.value['id']}',
                                      },
                                    ).then((res) {
                                      if (res != null) {
                                        item.value['is_like'] = 0;
                                        setState(() {});
                                      }
                                    });
                                  } else {
                                    postData(
                                      url: '/market/likeGoods',
                                      data: {
                                        'product_id': '${item.value['id']}',
                                      },
                                    ).then((res) {
                                      if (res != null) {
                                        showTost('收藏成功');
                                        item.value['is_like'] = 1;
                                        setState(() {});
                                      }
                                    });
                                  }
                                },
                                child:
                                    item.value['is_like'] == 1
                                        ? wImage(url: 'lanxing', width: 25)
                                        : wImage(url: 'xing', width: 25),
                              ),
                            ),
                          ],
                        ),
                        Padding(
                          padding: EdgeInsets.symmetric(horizontal: 15),
                          child: Column(
                            children: [
                              SizedBox(height: 10),
                              Row(
                                crossAxisAlignment: CrossAxisAlignment.center,
                                children: [
                                  wText(
                                    text: '${item.value['title']}',
                                    bold: true,
                                    size: 16,
                                  ),
                                  setInteger(item.value['vlv'], w: 15),
                                ],
                              ),
                              Align(
                                alignment: Alignment.topLeft,
                                child: wText(
                                  text: '来自 ${item.value['copyright']}',
                                  color: '878b95',
                                ),
                              ),
                              SizedBox(height: 10),

                              Row(
                                mainAxisAlignment:
                                    MainAxisAlignment.spaceBetween,
                                children: [
                                  // Column(
                                  //   children: [
                                  //     wText(text: '可售数量', color: '878b95'),
                                  //     Row(
                                  //       children: [
                                  //         wText(
                                  //           text: '${item.value['stock']}',
                                  //           color: '0F172B',
                                  //           bold: true,
                                  //           size: 16,
                                  //         ),
                                  //         wText(text: '份', color: '878b95'),
                                  //       ],
                                  //     ),
                                  //   ],
                                  // ),
                                  Column(
                                    children: [
                                      wText(text: '今日售价', color: '878b95'),
                                      Row(
                                        children: [
                                          wText(
                                            text:
                                                '${money(item.value['today_price'])}',
                                            color: '0F172B',
                                            bold: true,
                                            size: 16,
                                          ),
                                          wText(text: '元', color: '878b95'),
                                        ],
                                      ),
                                    ],
                                  ),
                                  wImage(url: 'go', width: 40),
                                ],
                              ),
                            ],
                          ),
                        ),
                      ],
                    ),
                  ),
                ),
            ],
          ),
        ),
      ],
    );
  }
}
